package com.springboot.cloud.sysadmin.organization.entity.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.springboot.cloud.common.core.annotation.Excel;
import com.springboot.cloud.common.web.entity.po.BasePo;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.*;

/**
 * Created by ZengJian on 2021/2/3 0003 上午 9:22
 */
@ApiModel("用户实体")
@Data
@Builder
@NoArgsConstructor(force=true)
@AllArgsConstructor
@TableName("user")
public class User extends BasePo {

    @Excel(name = "账号")
    private String username;
    private String password;
    private String openId;
    /**
     * 用户账号
     */
    @Excel(name = "用户昵称")
    private String nickname;
    @Excel(name = "性别")
    private String sex;
    @Excel(name = "电话")
    private String mobile;
    @Excel(name = "邮箱")
    private String email;
    private String avatar;
    private String description;
    @TableLogic
    private String deleted = "N";
    private Boolean enabled;
    private Boolean accountNonExpired;
    private Boolean credentialsNonExpired;
    private Boolean accountNonLocked;
    private Date loginIp;
    private Date loginDate;
    private String idCard;
    private String wechatId;
    private String certificateNo;
    private String macAddress;
    @TableField(exist = false)
    private Set<String> roles = new HashSet<String>();
    @TableField(exist = false)
    private Set<String> depts = new HashSet<String>();
    @TableField(exist = false)
    private Set<String> positions = new HashSet<String>();
    @TableField(exist = false)
    private Set<String> monads = new HashSet<String>();
    @TableField(exist = false)
    private String deptId;

}
